<template>
    <div class="demo-drawer-profile">
           <Row>
               <Col span="24">
                   编号: {{ row.id }}
               </Col>
           </Row>
           <Row>
               <Col span="24">
                   资源名: {{ row.resourceName }}
               </Col>
           </Row>
           <Row>
               <Col span="24">
                    评论人:  {{ row.user }}
               </Col>
           </Row>
           <Row>
               <Col span="24">
                   评论时间:  {{ row.createTime }}
               </Col>
           </Row>
       </div>
       <Divider />
       <Row>
           <Col span="24">
               评论内容: {{ row.content }}	
           </Col>
         
       </Row>
       <Divider />
</template>

<script setup>
const {row} = defineProps({
   row: {type: Object, required: true}
})

// 处理资源大小
function getSizeDisplay(size) {
   if (size > 1 << 30) return (size / (1 << 30)).toFixed(1) + "GB";
   if (size > 1 << 20) return (size / (1 << 20)).toFixed(1) + "MB";
   if (size > 1 << 10) return (size / (1 << 10)).toFixed(1) + "kB";
   return size + "B";
}
</script>

<style>
.demo-drawer-profile{
   font-size: 14px;
}
.demo-drawer-profile .ivu-col{
   margin-bottom: 12px;
}
.ivu-row {
   margin-bottom:20px;
}
</style>